<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   	xmlns:f="http://xmlns.jcp.org/jsf/core"
   	xmlns:h="http://xmlns.jcp.org/jsf/html"
   	xmlns:p="http://primefaces.org/ui"   
   	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
	
	<h:form>
		<p:growl>
			<p:autoUpdate />
		</p:growl>
	 
	    <p:panelMenu style="width: 100%; margin-bottom: 100px;" stateful="false">
	    	<p:submenu label="消息通知" expanded="true" rendered="#{request.isUserInRole('businessManager')}">
	    			<p:menuitem value="消息通知" outcome="/manage/business/NotificationList.xhtml"></p:menuitem>
	    	</p:submenu>
	    	<p:menuitem value="数据统计" outcome="/manage/business/stat/SupplierStat.xhtml" />
	    	
	    	<p:submenu label="业务管理" expanded="true" >
	    		<c:if test="#{request.isUserInRole('businessManager')}">
		    		<p:submenu label="交易管理" expanded="true">
		    			<p:menuitem value="公告管理" outcome="/manage/business/BulletinList.xhtml"></p:menuitem>
		    			<p:menuitem value="公告审核" outcome="/manage/business/unauditBulletinList.xhtml" rendered="#{userService.loginedUser.cityUser}"></p:menuitem>
		    			<p:menuitem value="报价管理" outcome="/manage/business/OveredPriceComparisonBulletinList.xhtml"></p:menuitem>
		    			<p:menuitem value="公告审核-择优选取" outcome="/manage/business/process/bestChooseEvaluationTaskList.xhtml" />
		    			<ui:remove>
		    				<p:menuitem value="公告审核-择优选取" outcome="/manage/business/BestChooseList.xhtml"></p:menuitem>
		    			</ui:remove>
		    			<ui:remove>
		    				<p:menuitem value="均价选取报价情况" outcome="/manage/business/inChoosingAverageBulletinList.xhtml"></p:menuitem>
		    			</ui:remove>
		    			<p:menuitem value="公告取消" outcome="/manage/business/successBulletinList_forCancel.xhtml"></p:menuitem>

						<p:menuitem value="评价管理" outcome="/manage/business/successBulletinList_forRate.xhtml"></p:menuitem>

		    			<p:menuitem value="投诉管理" outcome="/manage/business/ComplaintList.xhtml"></p:menuitem>
		    			<p:menuitem value="已取消的公告" outcome="/manage/business/CanceledBulletinList.xhtml"></p:menuitem>
		    			<p:menuitem value="备案登记" outcome="/manage/business/BulletinContractList.xhtml" rendered="false"/>
		    			<p:menuitem value="已结项公告" outcome="/manage/business/ApplyDoneBulletinList.xhtml" />
		    			<p:menuitem value="行业部门考评" outcome="/manage/business/ProfessionRatingRecordList.xhtml" />
		    			<p:menuitem value="可查看选取的公告" outcome="/manage/business/AuditSuccessBulletinList.xhtml" />		    			
		    			<p:menuitem value="已发短信" outcome="/manage/business/SmsList.xhtml" />
						<p:menuitem value="政务服务我建言" outcome="/manage/business/AdviceList.xhtml" />
		    		</p:submenu>
		    		<ui:remove>
			    		<p:submenu label="栏目管理" expanded="true">		    			
			    			<p:menuitem value="栏目管理" outcome="/manage/business/CategoryList.xhtml">
			    			</p:menuitem>
			    		</p:submenu>
			    	</ui:remove>	
		    		<p:submenu label="管理考核" expanded="true">		    			
		    			<ui:remove>
			    			<p:menuitem value="日常管理" outcome="/manage/approved/MemoList.xhtml" rendered="false">
			    				<f:param name="approvedType" value="Approved"></f:param>
			    			</p:menuitem>
			    			
			    			<p:menuitem value="违规处罚" outcome="/manage/approved/ViolationRecordList.xhtml" rendered="false">
			    				<f:param name="approvedType" value="Violation"></f:param>
			    			</p:menuitem>
							<p:menuitem value="中介机构信用申报审核" outcome="/manage/business/assess/pendingReviewTaskList.xhtml">
								<f:param name="processKey" value="supplierAssessRecordAudit"></f:param>
							</p:menuitem>
		    			</ui:remove>

		    			<p:menuitem value="中介机构评价申报审核" outcome="/manage/business/assess/pendingReviewTaskList.xhtml">
		    				<f:param name="processKey" value="backendAssessRecordAudit"></f:param>
		    			</p:menuitem>
		    			<p:menuitem value="被驳回评价申报" outcome="/manage/business/assess/initiatorReviewTaskList.xhtml">
		    			</p:menuitem>
		    			<p:menuitem value="信用评价" outcome="/manage/business/assess/AssessRecordList.xhtml">
		    			</p:menuitem>
		    			<p:menuitem value="待定名单新增" outcome="/manage/approved/UndeterminedRosterList.xhtml" rendered="#{request.isUserInRole('reporter') || request.isUserInRole('auditor')}">
		    			</p:menuitem>
		    			<p:menuitem value="待定名单删除" outcome="/manage/approved/DeterminedRecordList.xhtml" rendered="#{request.isUserInRole('reporter') || request.isUserInRole('auditor')}">
		    			</p:menuitem>
		    			<p:menuitem value="取消报名审核" outcome="/manage/business/process/CancelApplyTaskList.xhtml?processKey=applyCancelAudit" >
		    			</p:menuitem>
		    		</p:submenu>
		    		<p:submenu label="已办任务" expanded="true" rendered="#{request.isUserInRole('businessManager')}">
			    			<p:menuitem value="中介机构评价申报" outcome="/manage/business/process/FinishedTaskList.xhtml?processKey=backendAssessRecordAudit&amp;moduleName=已办-中介机构信用申报"></p:menuitem>
			    			<p:menuitem value="取消报名" outcome="/manage/business/process/ApplyCancelFinishedTaskList.xhtml?processKey=applyCancelAudit&amp;moduleName=已办-取消报名"></p:menuitem>
			    			<p:menuitem value="择优选取" outcome="/manage/business/process/BestChooseFinishedTaskList.xhtml?processKey=bestChooseAudit&amp;moduleName=已办-择优选取"></p:menuitem>
			    	</p:submenu>
		    		<p:submenu label="内容管理">
		    			<c:forEach var="_category" items="#{categoryList.resultList}">
		    				<p:menuitem value="#{_category.name}" outcome="/manage/business/ArticleList.xhtml">
		    					<f:param name="categoryId" value="#{_category.id}"></f:param>
		    				</p:menuitem>
		    			</c:forEach>
		    		</p:submenu>
	    		</c:if>
	    		<c:if test="#{request.isUserInRole('credentialManager')}">
			        <p:submenu label="用户管理" expanded="true">
			            <p:menuitem value="中介用户管理" outcome="/manage/credential/ServiceSupplierList.xhtml" />
			            <p:menuitem value="采购方用户管理" outcome="/manage/credential/ServiceBuyerList.xhtml" />
			            <c:if test="#{request.isUserInRole('developer') || request.isUserInRole('secretary') }">
			            	<p:menuitem value="管理员管理" outcome="/manage/user/SystemUserList.xhtml" />
			            	<p:menuitem value="行业部门用户管理" outcome="/manage/user/ProfessionUserList.xhtml" />
			            </c:if>
			        </p:submenu>
			        <p:submenu label="资质"  expanded="true">
			            <p:menuitem value="全部资质" outcome="/manage/credential/allCerts.xhtml" icon="ui-icon-disk" />
			            <ui:remove>
				            <p:menuitem value="待审核资质" outcome="/manage/credential/unauditCerts.xhtml" icon="ui-icon-disk" />
				            <p:menuitem value="审核通过的资质" outcome="/manage/credential/auditedCerts.xhtml" icon="ui-icon-disk" />
				            <p:menuitem value="审核失败的资质" outcome="/manage/credential/auditFailedCerts.xhtml" icon="ui-icon-disk" />
				         </ui:remove>
	        		</p:submenu>
		        </c:if>
	        </p:submenu>

			<p:submenu label="资质审核" rendered="#{request.isUserInRole('profession') &amp;&amp; userService.loginedUser.cityUser}" expanded="true">
				<p:menuitem value="全部资质" outcome="/profession/allCerts.xhtml" icon="ui-icon-disk" />
				<p:menuitem value="待审核资质" outcome="/profession/unauditCerts.xhtml" icon="ui-icon-disk" />
				<p:menuitem value="审核通过的资质" outcome="/profession/auditedCerts.xhtml" icon="ui-icon-disk" />
				<p:menuitem value="审核失败的资质" outcome="/profession/auditFailedCerts.xhtml" icon="ui-icon-disk" />
			</p:submenu>
	        
	        <p:submenu label="行业主管部门考评" rendered="false" expanded="true" >
	         	<p:menuitem value="中介考评" outcome="/profession/ServiceSupplierList.xhtml" icon="ui-icon-disk" />
	        </p:submenu>
	        
	        <p:submenu label="个人管理" expanded="true" rendered="#{not empty userService.loginedUser}">
	        	<p:menuitem value="注销" actionListener="#{logout.submit()}"  ajax="false" immediate="true"></p:menuitem>
	        </p:submenu>
	        
	        <p:separator />
	        <p:submenu label="系统管理" expanded="true" rendered="#{request.isUserInRole('admin')}">
	        	<p:submenu label="交易设置" expanded="true">
		        	<p:menuitem value="交易规则管理" outcome="/manage/system/TradeRuleList.xhtml"></p:menuitem>
					<p:menuitem value="行业管理" outcome="/manage/system/SectorList.xhtml"></p:menuitem>
					<p:menuitem value="资质分类管理" outcome="/manage/system/QualificationClassList.xhtml"></p:menuitem>
					<p:menuitem value="服务事项管理" outcome="/manage/system/AgentServiceList.xhtml"></p:menuitem>
					<p:menuitem value="主管单位管理" outcome="/manage/system/ServiceDepartmentList.xhtml"></p:menuitem>
	        	</p:submenu>
				
				<p:submenu label="考核设置" expanded="true" rendered="false">
					<p:menuitem value="考核类别管理" outcome="/manage/system/approved/ApprovedClassList.xhtml"></p:menuitem>
					<p:submenu label="考核事项管理" expanded="false">
						<c:forEach var="_class" items="#{approvedClassList.resultList}" varStatus="_status">
							<p:menuitem value="#{_class.name}" outcome="/manage/system/approved/ApprovedMatterList.xhtml">
								<f:param name="approvedClassId" value="#{_class.id}"></f:param>
							</p:menuitem>
						</c:forEach>
					</p:submenu>
				</p:submenu>
	        </p:submenu>
	        <p:submenu label="信用评价管理" expanded="true" rendered="#{request.isUserInRole('businessManager')}">		    			
    			<p:menuitem value="评价类别管理" outcome="/manage/business/assess/AssessClassList.xhtml" />
    			<p:menuitem value="评价事项管理" outcome="/manage/business/assess/DictList.xhtml" />
    		</p:submenu>
	        <p:submenu label="统计管理" expanded="true"  rendered="#{request.isUserInRole('businessManager')}">
	    		<p:submenu label="数据统计" expanded="true">
	    			<p:menuitem value="数据统计" outcome="/manage/business/stat/Statistics.xhtml" />
	    			<p:menuitem value="按月份统计" outcome="/manage/business/stat/BulletinStat.xhtml" />
	    			<p:menuitem value="按资质类型统计" outcome="/manage/business/stat/QualificationClassStat.xhtml" />
	    			<p:menuitem value="按采购方统计" outcome="/manage/business/stat/BuyerStat.xhtml" />
	    			<p:menuitem value="按中介机构统计" outcome="/manage/business/stat/SupplierStat.xhtml" />
	    			<p:menuitem value="项目统计" outcome="/manage/business/stat/BulletinStatList.xhtml?tradeStatus=Agreed"></p:menuitem>
	    		</p:submenu>
	    	</p:submenu>
			<p:submenu label="代码表管理" expanded="true"  rendered="#{request.isUserInRole('developer')}">
				<p:menuitem value="代码表管理" outcome="/manage/system/CodeDicList.xhtml" />
			</p:submenu>
	    </p:panelMenu>	    
	</h:form>
</ui:composition>